<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "module_nav".
 *
 * @property integer $id
 * @property string $nav_name
 * @property integer $nav_order
 * @property integer $module_nav_pid
 * @property integer $module_id
 * @property string $module_name
 * @property string $uptime
 */
class ModuleNav extends \common\models\base\BaseModel
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'module_nav';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['nav_order', 'module_nav_pid', 'module_id'], 'integer'],
            [['module_nav_pid', 'uptime'], 'required'],
            [['uptime'], 'safe'],
            [['nav_name', 'module_name'], 'string', 'max' => 40]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'nav_name' => '分类名称',
            'nav_order' => '分类排序(0为模块，其它为分类)',
            'module_nav_pid' => '模块分类父ID',
            'module_id' => 'moduleid',
            'module_name' => '模板名称',
            'uptime' => '更新时间',
        ];
    }
}
